package com.itany.manager.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itany.manager.entity.Company;
import com.itany.manager.mapper.CompanyMapper;
import com.itany.manager.service.CompanyService;
import org.springframework.stereotype.Service;

@Service
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements CompanyService {

    @Override
    public boolean existsById(Integer companyId) {
        if (companyId == null) {
            return false;
        }
        return lambdaQuery()
                .eq(Company::getId, companyId)
                .exists();
    }
}

